const pageMixin = {
  data () {
    return {
      // 分页的属性
      paging: {
        total: 0,
        page: 1,
        limit: 10
      }
    }
  },
  methods: {
    // 分页监听的事件，页面只要写handlePageChange重新查询数据即可
    pageChange (page, pageSize) {
      console.log(page)
      this.paging.page = page
      this.paging.limit = pageSize
      this.handlePageChange && this.handlePageChange(page, pageSize)
    }
  }
}

export default pageMixin
